# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=belr
pkgver=5.2.86
pkgrel=0
pkgdesc="ABNF Parser"
url="https://www.linphone.org/"
arch="all"
license="GPL-3.0-or-later"
options="!check" # not test available
makedepends="cmake bctoolbox-dev eudev-dev samurai"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.bz2::https://gitlab.linphone.org/BC/public/belr/-/archive/$pkgver/belr-$pkgver.tar.bz2"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_MODULE_PATH=/usr/lib/cmake \
		-DENABLE_STRICT=NO \
		-DENABLE_SHARED=YES \
		-DENABLE_TESTS=NO \
		-DENABLE_STATIC=NO \
		-DENABLE_STRICT=NO

	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
60b1d7669c7725673373a02d2ac601004f6dae1918e05ee76c4fcc54934deeb7292d58813cfdcf03c8edb37b226a6f6128aff7d6f5c289736e22d78c4ca56ccb  belr-5.2.86.tar.bz2
"
